package com.closer.server.support.sql;


import com.mybatisflex.core.query.QueryWrapper;

import java.util.Objects;

public class QueryWrapperHelper {

    public static <T> void likeIfPresent(QueryWrapper wrapper, Object value, String column) {
        if (Objects.nonNull(value)) {
            wrapper.like(column, value);
        }
    }

    public static <T> void eqIfPresent(QueryWrapper wrapper, Object value, String column) {
        if (Objects.nonNull(value)) {
            wrapper.eq(column, value);
        }
    }
}
